Page({
  data: {
    currentTab:0,
    date:'2017-10-28',
    ljfk:'../img/myD/ljfk.png',
    qxdd: '../img/myD/qxdd.png',
    zy: '../img/myD/zy.png',
    pro:[{
      pic: '../img/product/1.png',
      dec: '三的 SD-JR02绞肉机家用电动小型搅馅切菜打碎肉机蒜泥蒜蓉搅拌机',
      price: 69
    }, {
      pic: '../img/product/2.png',
      dec: '三的 SD-JR09绞肉机家用电动碎肉机不锈钢搅拌机小型搅馅打蒜蓉',
      price: 99
    }, {
      pic: '../img/product/3.png',
      dec: '三的 SD-JR10家用绞肉机全自动大容量商用碎肉机碎菜搅馅切丝切片',
      price: 299
    }, {
      pic: '../img/product/4.png',
      dec: '三的 SD-JR303绞肉机家用电动小型搅馅切菜打碎肉机蒜泥蒜蓉搅拌机',
      price: 239
    }],
    m_pro:[{
      pic: '../img/myD/1.png',
      dec: '【品牌直采】三的 SD-JR02绞肉机家用电动小型',
      price: 149,
      yprice:298,
      score:'97.1%',
      cu:'满399减150'
    }, {
      pic: '../img/myD/2.png',
      dec: '【品牌直采】三的 SD-JR02绞肉机家用电动小型',
      price: 149,
      yprice: 298,
      score: '97.2%',
      cu: '满199得赠品'
    }],
    buy:{
      num:1,
      total:'706.00'
    }
  },
  onLoad(e){
    wx.setNavigationBarTitle({
      title: '我的订单'
    })
    var page = this;
    wx.getSystemInfo({
      success: function (res) {
        console.log(res);
        page.setData({ winWidth: res.windowWidth });
        page.setData({ winHeight: res.windowHeight });
      }
    });
  }, 
  switchNav: function (e) {
    var id = e.currentTarget.id;
    this.setData({ currentTab: id });
  },
  ljfk(e){
    wx.showToast({
      title: '付款成功',
      duration:2000
    })
    wx.navigateBack({})
  },
  qxdd(e){
    wx.showToast({
      title: '取消成功',
    })
    wx.navigateBack({})
  },
  mproChange(e){
    var id = e.currentTarget.id;
    wx.navigateTo({
      url: '../detail/detail?id='+id,
    })
  }
})